@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
@import './colors.scss';

body {
  height: 100%;
  background: $background-color-lightest;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: "HarmonyOS Sans", Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

* {
  font-family: "HarmonyOS Sans", Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif !important;
}

.nc_iconfont {
  font-family: "nc_iconfont" !important;
}

.no-padding {
  padding: 0px !important;
}

.padding-content {
  padding: 4px 0;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.fr {
  float: right;
}

.fl {
  float: left;
}

.pr-5 {
  padding-right: 5px;
}

.pl-5 {
  padding-left: 5px;
}

.block {
  display: block;
}

.pointer {
  cursor: pointer;
}

.inlineBlock {
  display: block;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

code {
  background: $background-color-light;
  padding: 15px 16px;
  margin-bottom: 20px;
  display: block;
  line-height: 36px;
  font-size: 14px;

  a {
    color: $text-color-link;
    cursor: pointer;

    &:hover {
      color: $text-color-link-hover;
    }
  }
}

.warn-content {
  background: rgba($success-color, .1);
  border-radius: 2px;
  padding: 16px;
  padding: 1rem;
  line-height: 1.6rem;
  word-spacing: .05rem;

  a {
    color: $success-color;
    font-weight: 600;
  }
}

//main-container全局样式
.app-container {
  padding: 20px;
}

.components-container {
  margin: 30px 50px;
  position: relative;
}

.pagination-container {
  margin-top: 30px;
}

.editor-container .CodeMirror {
  height: 100% !important;
}

.text-center {
  text-align: center
}

.sub-navbar {
  height: 50px;
  line-height: 50px;
  position: relative;
  width: 100%;
  text-align: right;
  padding-right: 20px;
  transition: 600ms ease position;
  background: linear-gradient(90deg, $secondary-color 0%, $secondary-color 0%, $secondary-color-dark 100%, $secondary-color-dark 100%);

  .subtitle {
    font-size: 20px;
    color: #fff;
  }

  &.draft {
    background: $background-color-medium;
  }

  &.deleted {
    background: $background-color-medium;
  }
}

.link-type,
.link-type:focus {
  color: $text-color-link;
  cursor: pointer;

  &:hover {
    color: $text-color-link-hover;
  }
}

.filter-container {
  padding-bottom: 10px;

  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
  }
}

//refine vue-multiselect plugin
.multiselect {
  line-height: 16px;
}

.multiselect--active {
  z-index: 1000 !important;
}

.el-button--primary {
  background-color: $primary-color;
  border-color: $primary-color;

  &:hover {
    background-color: $primary-color-light;
    border-color: $primary-color-light;
  }
}

.el-button--text {
  color: $primary-color;
}

.el-tabs__item:hover {
  color: $primary-color-light;
}

.el-tabs__item.is-active {
  color: $primary-color;
}

.el-tabs__active-bar {
  background-color: $primary-color;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body {
    padding: 0;
    margin: 0;
  }

  #app {
    min-width: 100vw;
    width: 100vw;
    overflow-x: hidden;
  }

  .app-container,
  .components-container {
    padding: 8px !important;
    margin: 0 !important;
  }

  .pagination-container {
    margin-top: 10px;
  }

  .sub-navbar {
    padding-right: 8px;

    .subtitle {
      font-size: 16px;
    }
  }

  .text-center {
    font-size: 14px;
  }
}